
DEFINE VARIABLE i AS INTEGER.

DEFINE VARIABLE str AS CHARACTER FORMAT "x(32)" .

FOR EACH usr_mstr :

    str = "".

    DO i = 1 TO NUM-ENTRIES(usr_group) :

        IF LENGTH(ENTRY(i,usr_group)) > 3 THEN NEXT.

        IF LOOKUP(SUBSTRING(ENTRY(i,usr_group), 1, 2), str) = 0  THEN
            str = str  + "," + SUBSTRING(ENTRY(i,usr_group), 1, 2) .

    END.
    /*
    DISPLAY usr_group str .
    */
    ASSIGN usr_group = usr_group + str .

END.

